package com.chixing.work_04;

public class Account {
    private long accNo;
    private String accName;
    private String accPassword;
    private long accTelno;
    private float accBalance;

    public float depoist(float balance){
        return this.accBalance += balance;
    }

    public float withdraw(float balance){
        return this.accBalance -= balance;
    }

    public Account(){}

    public Account(long accNo, String accName, String accPassword, long accTelno, float accBalance) {
        this.accNo = accNo;
        this.accName = accName;
        this.accPassword = accPassword;
        this.accTelno = accTelno;
        this.accBalance = accBalance;
    }

    public long getAccNo() {
        return accNo;
    }

    public void setAccNo(long accNo) {
        this.accNo = accNo;
    }

    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    public String getAccPassword() {
        return accPassword;
    }

    public void setAccPassword(String accPassword) {
        this.accPassword = accPassword;
    }

    public long getAccTelno() {
        return accTelno;
    }

    public void setAccTelno(long accTelno) {
        this.accTelno = accTelno;
    }

    public float getAccBalance() {
        return accBalance;
    }

    public void setAccBalance(float accBalance) {
        this.accBalance = accBalance;
    }

    @Override
    public String toString() {
        return "Account{" +
                "accNo=" + accNo +
                ", accName='" + accName + '\'' +
                ", accPassword='" + accPassword + '\'' +
                ", accTelno=" + accTelno +
                ", accBalance=" + accBalance +
                '}';
    }
}
